package part8;

/**
 * @author wcj
 * @Date 2021/5/16 17:52
 * @Version 1.0
 */
public class Part86 extends High{

    private Bread b = new Bread();
    private Cheese c = new Cheese();
    public Part86(){
        System.out.println("Part86");
    }

    /**
     * 初始化的顺序是基类的静态变量，静态块，子类的静态变量，静态块。基类的成员变量，构造函数，子类的成员变量，构造函数
     * @param args
     */
    public static void main(String[] args) {
        new Part86();
    }
}

class Meal {
    public Meal() {
        System.out.println("meal");
    }
}

class Bread {
    public Bread() {
        System.out.println("Bread");
    }
}

class Cheese {
    public Cheese() {
        System.out.println("Chess");
    }
}


class Lunch extends Meal {
    public Lunch() {
        System.out.println("Lunch");
    }
}

class High extends Lunch {
    public High() {
        System.out.println("High");
    }
}


